<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="实时线报,猫超一分包邮,聚划算免单" />
    <meta name="description" content="实时线报,每日更新，猫超一分包邮，聚划算免单，半价，秒杀汇总" />

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>实时线报--8月25日，猫超一分包邮，聚划算免单，半价，秒杀汇总 已更新 - 实时线报</title>
    <link rel="shortcut icon" href="/Public/images/favicon.ico" />
    <link href="/Public/style/bootstrap.min.css" rel="stylesheet">
     <link href="/Public/style/base.css" rel="stylesheet" />
     <script type="text/javascript" charset="utf-8" src="/Public/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/Public/ueditor/ueditor.all.min.js"> </script>
    <script type="text/javascript" charset="utf-8" src="/Public/ueditor/lang/zh-cn/zh-cn.js"></script>
    <style type="text/css">
        .container{width: 80%;margin: 0 auto}
    </style>
</head>
<body>
<div class="container" style="margin-bottom: 80px">
  <h2 style="text-align: center;font-size: 25px;font-weight: 900">线报后台管理系统</h2>
    <nav class="navbar navbar-inverse">
        
            <ul class="nav nav-pills">
                  <li role="presentation" ><a href="" style="font-size: 20px">发布线报</a></li>
                  <li role="presentation" ><a href="#" style="font-size: 20px">查看信息</a></li>
                  <li role="presentation"><a href="#" style="font-size: 20px">查看流量</a></li>
                  <li role="presentation"><a href="#" style="font-size: 20px">用户管理</a></li>
            </ul>
    </nav>
    <form action="<?php echo U(index/add);?>" method="post" enctype="multipart/form-data" id="formdata">
      <div class="form-group">
        <label for="exampleInputEmail1">线报标题<span style="color: red">*</span>：</label>
        <input type="text" class="form-control" id="title" name="title" placeholder="线报标题">
      </div>
 
       <div class="form-group">
        <label for="exampleInputEmail1">线报链接（非必需）：</label>
        <input type="text" class="form-control"  name="link" placeholder="线报链接">
      </div>
      <div class="form-group">
        <label for="exampleInputEmail1">原价（非必需）：</label>
        <input type="text"  name="yuanjia"  id="yuanjia"  placeholder="当前价格">元
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

         <label for="exampleInputEmail1">券后价格（非必需）：</label>
        <input type="text" name="current" id="current" placeholder="券后价格">元
      </div>

      <div class="form-group">

        <label for="exampleInputEmail1">选择类别：</label>

            <select class="btn btn-default dropdown-toggle" aria-haspopup="true" aria-expanded="false" name="category">
                 <option value="实时线报" selected="selected">实时线报</option>
                <option value="猫超整点包邮">猫超整点包邮</option>
                <option value="整点抢购">整点抢购</option>
                <option value="今日值得买">今日值得买</option>
                <option value="网站广告">网站公告</option>
                <option value="火爆热售">火爆热售</option>
                 <option value="置顶">置顶</option>
            </select>

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <label for="exampleInputEmail1">线报等级：</label>

            <select class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" name="level">
                <option value="0" selected="selected">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4" >4</option>
                <option value="5">5</option>
                <option value="6">6</option>
                <option value="7" >7</option>
                <option value="8">8</option>
                <option value="9">9</option>
                <option value="10">10</option>
            </select>(0级表示游客可看)
        </div>
      <div class="form-group">
        <label for="exampleInputEmail1">来源（非必需）：</label>
        <input type="text" class="form-control" name="from" placeholder="线报来源">
      </div>


        <div class="form-group">
        <label for="exampleInputEmail1">上传缩略图（非必需）：</label>
        <input type="file" name="file">
      </div>

       <div class="form-group">
          <label for="exampleInputEmail1">内容：</label>
          <textarea  id="content" name="content"></textarea>
      </div>

      <input type="submit" class="btn btn-primary" value="提交" onclick="return checkform()">
      <input type="reset" class="btn btn-default" value="重置">
 
    </form>

    </div>
    <script src="/Public/style/jquery.min.js"></script>
    <script src="/Public/style/bootstrap.min.js"></script>

<script type="text/javascript">
    var screenWidth=screen.width;
 
    if (screenWidth>960) {
        screenWidth=1000;
    }
    var ue = UE.getEditor('content',{
            autoHeightEnabled: true,
            autoFloatEnabled: true,
            initialFrameWidth:screenWidth,
            initialFrameHeight:200
        });

    /*表单检测*/
    function checkform(){

      var title=$("#title").val();
      if (title==''||title==null) {
          alert('请填写线报标题');
          return false;
      }

      $.ajax({
        type: "POST",
        dataType: "json",
        data: $('#formdata').serialize(),
        url:"<?php echo U('/admin/index/checkform');?>",
        success: function(data){
           if (data.code==1) {
            alert(data.msg);
            return false;
           }else{
            return true;
           }
        }

      });

      return false;
    }

 
</script>
    
</body>
</html>